<div data-data-ng-switch="type">
    <input type="text" data-data-ng-model="referenceString" placeholder="Law here..." data-ng-change="referenceStringChange();" />
    <div data-ng-switch-when="link">
        <div data-ng-switch="reference.law" >
            <div data-ng-switch-when="null">
                <span data-ng-hide="!reference.short">{{reference.short}}</span>
                <span data-ng-hide="!reference.paragraph"> § {{reference.paragraph}}</span>
                <span data-ng-hide="!reference.fragment"> lg. {{reference.fragment}}</span>
                <span data-ng-hide="!reference.point"> p. {{reference.point}}</span>
            </div>
            <div data-ng-switch-default>
                <a data-ng-hide="!reference.url" href="{{reference.url}}" target="_blank" title="{{reference.law.long}}">
                    <span data-ng-hide="!reference.short">{{reference.short}}</span>
                    <span data-ng-hide="!reference.paragraph"> § {{reference.paragraph}}</span>
                    <span data-ng-hide="!reference.fragment"> lg. {{reference.fragment}}</span>
                    <span data-ng-hide="!reference.point"> p. {{reference.point}}</span>
                </a>
            </div>
        </div>
    </div>
    <div data-ng-switch-when="edit">Edit</div>
</div>